package com.adee.nowcoder.huawei;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class T042_HJ042 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLong()) { // 注意 while 处理多个 case
            String n = in.nextLong() + "";
            String ge = null;
            String thousand = null;
            String million = null;
            String billion = null;
            int len = n.length();
            if(len <= 3) {
                ge = n;
            } else if(len > 3 && len <= 6) {
                thousand = n.substring(0, len-3);
                ge = n.substring(len-3);
            } else if(len > 6 && len <= 9) {
                million = n.substring(0, len-6);
                thousand = n.substring(len-6, len-3);
                ge = n.substring(len-3);
            } else if(len > 9) {
                billion = n.substring(0, len-9);
                million = n.substring(len-9, len-6);
                thousand = n.substring(len-6, len-3);
                ge = n.substring(len-3);
            } else {
                System.out.println("error");
                return;
            }

            StringBuilder sb = new StringBuilder();

            if(billion != null) {
                sb.append(toStr(billion)).append("billion ");
            }
            if(million != null) {

                sb.append(toStr(million)).append("million ");
            }
            if(thousand != null) {

                sb.append(toStr(thousand)).append("thousand ");
            }
            if(ge != null) {

                sb.append(toStr(ge));
            }

            System.out.println(sb.toString());
        }
    }

    // 三位数
    static String toStr(String h) {
        long a = Long.parseLong(h);
        StringBuilder sb = new StringBuilder();
        long bai = a/100;
        if(bai > 0) {
            sb.append(map.get(bai)).append(" hundred ");
        }
        long shige = a%100;
        if(shige > 0 && shige < 20) {
            if(sb.length() > 0) {
                sb.append("and ");
            }
            sb.append(map.get(shige)).append(" ");
        } else if(shige >= 20) {
            if(sb.length() > 0) {
                sb.append("and ");
            }
            long ge = shige%10;
            long shi = shige-ge;
            sb.append(map2.get(shi)).append(" ");
            if(ge > 0) {
                sb.append(map.get(ge)).append(" ");
            }
        }
        return sb.toString();
    }

    static Map<Long,String> map = new HashMap<>();
    static Map<Long,String> map2 = new HashMap<>();
    static {
        map.put(1L,"one");
        map.put(2L,"two");
        map.put(3L,"three");
        map.put(4L,"four");
        map.put(5L,"five");
        map.put(6L,"six");
        map.put(7L,"seven");
        map.put(8L,"eight");
        map.put(9L,"nine");
        map.put(10L,"ten");
        map.put(11L,"eleven");
        map.put(12L,"twelve");
        map.put(13L,"thirteen");
        map.put(14L,"fourteen");
        map.put(15L,"fifteen");
        map.put(16L,"sixteen");
        map.put(17L,"seventeen");
        map.put(18L,"eighteen");
        map.put(19L,"nineteen");

        map2.put(20L,"twenty");
        map2.put(30L,"thirty");
        map2.put(40L,"forty");
        map2.put(50L,"fifty");
        map2.put(60L,"sixty");
        map2.put(70L,"seventy");
        map2.put(80L,"eighty");
        map2.put(90L,"ninety");


    }
}
